package cn.itsource.pet.controller;

import cn.itsource.basic.util.PageList;
import cn.itsource.pet.pojo.domain.SearchMasterMsg;
import cn.itsource.pet.query.SearchMasterMsgQuery;
import cn.itsource.pet.service.ISearchMasterMsgService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 宠物类型控制器
 */
@RestController
@RequestMapping("/searchMasterMsg")
@Api(tags = "宠物类型管理", description = "宠物类型操作接口")
public class SearchMasterMsgController {

    @Autowired
    private ISearchMasterMsgService msgService;

    /**
     * 准备一个宠物发布接口
     */
    @PostMapping("/pageList")
    public PageList<SearchMasterMsg> publish(@RequestBody SearchMasterMsgQuery msgQuery){
        //发布
        return msgService.findPage(msgQuery);
    }
}
